/**
 * 
 */
package org.lookouster.mopg;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

/**
 * @author lkster
 *
 */
public class MoPGRunner {
	
	Timer timer;

	public MoPGRunner(int seconds) {
        timer = new Timer();
        timer.schedule(new RemindTask(), new Date(), seconds*1000);
	}

    class RemindTask extends TimerTask {
        public void run() {
            System.out.format("Time's up!%n");
            
            //DO the job
            
            //timer.cancel(); //Terminate the timer thread ==> 
        }
    }
    
    public static void main(String[] args)
	{
		new MoPGRunner(60);
	    System.out.format("Task scheduled.%n");
	}

}
